sx v3.01.01 (Sound eXchange) Sep 22 2004 by Dave Mercier, EAC
USAGE: sx <format> [options] <sourcefiles>
VERSION: WIN NT v3.01.01 (Sound eXchange), Spit v3.19
SUMMARY: sx is a sample format converter

FOR NHL07:

WAV->ASF
> sx -pcstream audio.wav -=audio.asf

ASF->WAV
> sx -wave audio.asf -=audio.wav



         SPIT environment variable is SX_OPTS

    -aiff            Export Apple AIFF/AIFC
                         (s16b_int)
                         (s8_int)
                         (dvi_int)
                         (s24b_int)
    -wave            Export Microsoft Wave
                         (s16l_int)
                         (u8_int)
    -cdxa            Export CD-ROM XA
                         (cdxa)
    -vag             Export Sony VAG
                         (vag_blk)
    -raw             Export RAW (no header)
                         (s8_int)
                         (s8_blk)
                         (u8_int)
                         (s16b_int)
                         (s16b_blk)
                         (s16l_int)
                         (s16l_blk)
                         (eaxa_blk)
                         (cdxa)
                         (vag_blk)
                         (dvi_int)
                         (mt_blk)
                         (mt5_blk)
                         (s24l_int)
                         (s24b_int)
    -pcbank          Export SND PC bank
                         (s8_blk)
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
                         (vag_blk)
                         (xboxadpcm)
                         (gcadpcm)
    -pcstream        Export SND PC stream
                         (s8_blk)
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -macbank         Export SND MAC bank
                         (s8_blk)
                         (s16b_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
                         (vag_blk)
                         (xboxadpcm)
                         (gcadpcm)
    -macstream       Export SND MAC stream
                         (s8_blk)
                         (s16b_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -ps2bank         Export SND PS2 bank
                         (vag_blk)
                         (s8_blk)
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -ps2stream       Export SND PS2 stream
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -gcbank          Export SND GC bank
                         (s16b_blk)
                         (gcadpcm)
                         (mt_blk)
                         (eaxa_blk)
                         (mt5_blk)
    -gcstream        Export SND GC stream
                         (s16b_blk)
                         (mt_blk)
                         (eaxa_blk)
                         (mt5_blk)
    -xboxbank        Export SND XBOX bank
                         (s16l_blk)
                         (xboxadpcm)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -xboxstream      Export SND XBOX stream
                         (s16l_blk)
                         (xboxadpcm)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -sndstream       Export SND Generic stream
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -xenonbank       Export SND XENON bank
                         (s16b_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -pspbank         Export SND PSP bank
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
                         (vag_blk)
    -xenonstream     Export SND XENON stream
                         (s16b_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -pspstream       Export SND PSP stream
                         (s16l_blk)
                         (eaxa_blk)
                         (mt_blk)
                         (mt5_blk)
    -raw<samplerep>  Import RAW with given sample data representation
                         (s8_int)
                         (s8_blk)
                         (u8_int)
                         (s16b_int)
                         (s16b_blk)
                         (s16l_int)
                         (s16l_blk)
                         (s24l_int)
                         (s24b_int)

Sample data representations that may be specified:
    -s16l_int        Signed 16-Bit Little-Endian Interleaved
    -s16b_int        Signed 16-Bit Big-Endian Interleaved
    -s8_int          Signed 8-Bit Interleaved
    -mt_blk          MicroTalk Block (10:1)
    -vag_blk         Sony VAG Block (3.5:1)
    -s16b_blk        Signed 16-Bit Big-Endian Block
    -s16l_blk        Signed 16-Bit Little-Endian Block
    -s8_blk          Signed 8-Bit Block
    -eaxa_blk        EA-XA Block (3.7:1)
    -u8_int          Unsigned 8-Bit Interleaved
    -cdxa            CD-XA Interleaved (3.5:1)
    -dvi_int         DVI Interleaved (4:1)
    -gcadpcm         GameCube ADPCM (3.5:1)
    -s24l_int        Signed 24-Bit Little-Endian Interleaved
    -xboxadpcm       Xbox ADPCM (3.5:1)
    -s24b_int        Signed 24-Bit Big-Endian Interleaved
    -mt5_blk         MicroTalk Block (5:1)

    -noprogress      Do not display progress bars
    -rawc<channels>  Specify RAW input channels (default 1)
    -raws<rate>      Specify RAW samplerate (default 22050 Hz.)
    -split           Split multi-channel into multiple single-channel files
    -onetomany       Break multi-element files into individual files
    -element<offset> Adjust destination element positions by this offset
    -notruncate      Don't remove samples after loop (default truncates)
    -det<cents>      Specify new detune in cents for playback (default is 0)
    -br<semitones>   Specify bend range for playback (default is 0)
    -vol<0-127>      Specify volume for playback (default is 127)
    -rd<cents>       Specify random detune range in cents (default is 0)
    -mrd<cents>      Specify master random detune range in cents (default is 0)
    -rv<0-127>       Specify random volume range for playback (default is 0)
    -pan<0-127>      Specify pan offset (default is 64)
    -rp<0-127>       Specify random pan offset range (default is 0)
    -fps<0.1-120.0>  Specify chunk rate for stream (default is 15.0)
    -renv<-1-127>    Specify release envelope (default is -1)
    -envi<0-127>     Specify initial envelope volume (default is 127)
    -env<dur,vol[,dur,vol,...]> Specify playback envelope as a series of
                                segments, each with a duration and volume.
                                duration is in 1/100ths of a second and volume
                                ranges from 0..127
    -az<0..65535[,...]>         Specify directional azimuths for each channel.
                                First azimuth listed corresponds to the lowest
                                channel. An azimuth of 0 would be directly
                                ahead, 16384 would be directly to the right.
    -loops<sample>
            The loop start value sets which sample the loop section begins on.
                "sample" - Specify the sample to begin the loop section, -1 
                indicates no loop start point. Allowable range is -1 .. 
                2147483647.
    -loope<sample>
            The loop end value sets which sample the loop section ends on.
                "sample" - Specify the sample to end the loop section, -1 
                indicates no loop end point. Allowable range is -1 .. 
                2147483647.
    -ifnoloops<sample>
            The loop start is set to the value given, if there isn't one 
            currently in the file.  -1 means no loop start point.
                "sample" - Specify the sample to begin the loop section, -1 
                means no loop start point Allowable range is -1 .. 2147483647.
    -ifnoloope<sample>
            The loop end is set to the value given, if there isn't one 
            currently in the file.  -1 means no loop end point
                "sample" - Specify the sample to end the loop section, -1 means
                no loop end point. Allowable range is -1 .. 2147483647.
    -markertouser
            Explicitly transfer all the AIFF markers to user data.  This is not
            done by default
    -cbr<bitrate>
            The constant bit rate is used to set the level of compression.
                "bitrate" - Specify in bits per second. Allowable range is 8000
                .. 960000.
    -vbr<quality>
            The variable bitrate quality is used to set the level of 
            compression.
                "quality" - Specify compression quality, 0 = highest 
                compression (bad sound quality), 100 = lowest compression (good
                sound quality) Allowable range is 0 .. 100.
    -playloc<location>
            The play-back location determines what system a sound will be 
            played from.
                "location" - Location can be one of 'default', 'spu', 
                'maincpu', 'iopcpu', 'ds2dhw', 'ds3dhw', or 'dsp'.
    -priority<value>
            Set priority for voice allocation.
                "value" - Specify priority for playback (default is 0, 100 is 
                highest). Allowable range is 0 .. 100.
    -fxzero<level>
            Set level for effect bus 0.
                "level" - Specify effect level for bus 0 (default is 0). 
                Allowable range is 0 .. 127.
    -embeduser<data>
            Attach user data to a sample.
                "data" - Specify user data to attach to sample. Specify as a 
                file name.
    -embedts<window>
            Generate and embed additional data needed to perform run-time time 
            stretch.
                "window" - Window size to use to correlate sample data, 
                specified in microseconds. 9000 is a good default. Allowable 
                range is 1000 .. 100000.
    -removeuserbyid<id>
            Remove user data chunks from a sample, which ID matches the given 
            value.
                "id" - Specified as the id of the chunk(s) to be removed.  It 
                must be a four-letter id. (eg. MYID)
    -removeuserbyvalue<value>
            Remove user data chunks from a sample, which ID matches the given 
            value.
                "value" - Specified as the id of the chunk(s) to be removed.  
                The value entered can be of any standard format, but you must 
                specify it clearly. (eg. 0x4F64EA6C) Allowable range is 
                -2147483648 .. 2147483647.
    -removeuserall
            Remove all user data from a sample. (No parameter is required)
    -rs<rate>
            Resample to a new rate.
                "rate" - Specified as new sample rate in Hertz. Allowable range
                is 400 .. 96000.
    -dstofit<frames>
            Ensure sample uses no more than N frames by reducing sample rate 
            until it fits.
                "frames" - Specify maximum amount of frames allowable in 
                sample. Allowable range is 1 .. 2147483647.
    -alignloop<alignment>
            Resample and insert silence to line loop points up to alignment 
            restrictions.
                "alignment" - Specify the alignment restriction. Allowable 
                range is 2 .. 1024.
    -padloop<padding>
            Extend and/or replace samples after loop end point with the samples
            that begin at the loop start point.
                "padding" - Specify the amount of samples to pad out after the 
                loop end point. Allowable range is 0 .. 2147483647.
    -sa<amplitude>
            Scale amplitude of sample.
                "amplitude" - Specified as percentage of original volume. 
                Allowable Range is -10000.0 .. 10000.0.
    -fadein<time>
            Apply linear fade-in to sample.
                "time" - Specified as milliseconds into sample to achieve full 
                amplitude. Allowable range is 0 .. 2147483647.
    -fadeout<time>
            Apply linear fade-out to sample.
                "time" - Specified as milliseconds to end of sample to begin 
                fade to zero amplitude. Allowable range is 0 .. 2147483647.
    -crop<startframe,frames>
            Crop a section of a sample.
                "startframe" - Specify frame to begin crop at. Negative values 
                insert silence at start of crop. Allowable range is -2147483647
                .. 2147483647.
                "frames" - Specify number of frames to crop. Specifying past 
                original sample will insert silence at end of crop. Allowable 
                range is 1 .. 2147483647.
    -remix<target>
            Remix will either down-mix or up-mix or otherwise remix the source 
            into the new target mix type. For example a 5.1 file could be mixed
            down to stereo, or even a stereo ProLogic II file. Note that 
            ProLogic encoded files are not decoded when converted to quad or 
            5.1, they are treated as stereo.
                "target" - Remix target can be one of 'mono', 'stereo', 'quad',
                '5.1', or 'prologic2'.
    -copychan<source,destination>
            Copy source channel sample data to destination channel.
                "source" - Source channel to copy (channels start at 0). 
                Allowable range is 0 .. 5.
                "destination" - Destination channel to copy to (channels start 
                at 0). Allowable range is 0 .. 5.
    -cutchan<source>
            Cut source channel sample data out of sample.
                "source" - Source channel to cut (channels start at 0). 
                Allowable range is 0 .. 5.
    -distort<amount>
            Distorts the signal by clipping high amplitudes.
                "amount" - Specify amount of distortion (0 is least 
                distortion). Allowable range is 0 .. 32767.
    -reverb<preset,level>
            Apply given reverb type to sample.
                "preset" - Specify reverb preset. Allowable range is 0 .. 0.
                "level" - Specify reverb level. Allowable range is 0 .. 127.
    -resampfilter<filter>
            Resample to a new rate using a filter profile.
                "filter" - Specify filter profile to use to perform resample. 
                Specify as a file name.

SX currently supports the following formats for importing:
    - Apple AIFF/AIFC
    - Microsoft Wave
    - CD-ROM XA
    - Sony VAG
    - RAW (no header)
    - SND PC bank
    - SND PC stream
    - SND MAC bank
    - SND MAC stream
    - SND PS2 bank
    - SND PS2 stream
    - SND GC bank
    - SND GC stream
    - SND XBOX bank
    - SND XBOX stream
    - Quicktime Movie
    - MPEG
    - SND Generic stream
    - SND XENON bank
    - SND PSP bank
    - SND XENON stream
    - SND PSP stream

    @<file>       'with' file, containing a list of options and files
    -.ext         specifies output file extension
    -=<name>      specifies output file name
    -v0           no console output
    -v1           prints source file name and errors
    -v2           status line for each file (default)
    -v3           additional info

Example:
    Convert AIFF format audio.aif into pc stream format audio.asf.

    > sx -pcstream audio.aif -=audio.asf

